package com.neuedu.nep.service.impl;

import com.neuedu.nep.dao.GridCityDao;
import com.neuedu.nep.model.GridCity;
import com.neuedu.nep.model.GridCityExample;
import com.neuedu.nep.service.CityService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 黄宇佳
 * @create 2024-04-10 14:39
 * @description:
 */
@Service
public class CitySerciceImpl implements CityService {
    @Resource
    private GridCityDao gridCityDao;

    @Override
    public List<GridCity> CityAllByProvinceId(Integer provinceId) {
        GridCityExample example=new GridCityExample();
        GridCityExample.Criteria criteria=example.createCriteria();
        criteria.andProvinceIdEqualTo(provinceId);
        return gridCityDao.selectByExample(example);
    }
}
